package com.duomn.mybatis.sample.service.impl;

import java.util.List;

import com.duomn.mybatis.sample.dao.ISampleDao;
import com.duomn.mybatis.sample.entity.Sample;
import com.duomn.mybatis.sample.service.ISampleService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SampleServiceImpl implements ISampleService {
	
	@Autowired
	private ISampleDao sampleDao;

	@Override
	public List<Sample> listSample() {
		return sampleDao.listSample();
	}
	
	@Override
	public Integer saveSample(Sample sample) {
		return sampleDao.saveSample(sample);
	}

	@Override
	public Integer updateSample(Integer id, Sample sample) {
		return sampleDao.updateSample(id, sample);
	}

	@Override
	public Sample querySample(String userId) {
		return sampleDao.queryByCondition(userId);
	}

}
